Sorting Presorted Files
نویسنده
چکیده
A new sorting algorithm is presented. Its running time is O(n(1+10g(F/n)) where F = I{(f,j); i < j and xi < xj}1 is the total number of inversions in the input sequence xn xn_1 xn_2 ... x2 xl· In other words, presorted sequences are sorted quickly, and completely unsorted sequences are sorted in O(n log n) steps. Note that F < n2/2 always. Furthermore, the constant of proportionality is fairly small and hence the sorting method is competitive with existing methods for not too large n.
منابع مشابه
Revisiting Visibility in the Plane
We consider two closely related problems: computing the region visible from a point amid simple polygonal obstacles and computing the lower envelope of a set of disjoint segments. Visibility problems such as these were proposed and promptly solved in the late ’80s and early ’90s before the widespread popularity of the word RAM model. All previously published algorithms thus run in Ω(n log n) ti...
متن کاملSmoothsort's Behavior on Presorted Sequences
In [5], Mehlhorn presented an algorithm for sorting nearly sorted sequences of length n in time 0(n(1+log(F/n») where F is the number of initial inversions. More recently, Dijkstra[3] presented a new algorithm for sorting in situ. Without giving much evidence of it, he claims that his algorithm works well on nearly sorted sequences. In this note we show that smoothsort compares unfavorably to M...
متن کاملEpithelial cell polarity from the outside looking in.
Epithelial cell polarity may be regulated by protein sorting in the Golgi and delivery to different membrane domains, a view from the inside looking out. But from the outside looking in, cell adhesion may be required first to establish sites for delivery, retention, and separation of membrane proteins, and delivery of presorted proteins from the Golgi subsequently reinforces and maintains diffe...
متن کاملA hardware sort - merge system
A hardware sort-merge system which can sort large files rapidly is proposed. It consists of an initial sorter and a pipelined merger. In the initial sorter, record sorting is divided into two parts: key-pointer sorting and record rearranging. The pipelined merger is composed of several intelligent disks each of which has a simple processor and some buffers. The hardware sortmerge system can sor...
متن کاملEfficient Selection and Sorting Schemes Using Coteries for Processing Large Distributed Files
In this paper, we develop efficient selection and sorting schemes for processing large files distributed over a network. The efficiencies of the schemes are expressed in terms of message count and communication delay. The schemes are developed using the concept of coteries which is a class of communication structures widely used in the development of some classical distributed algorithms, namel...
متن کامل